import { InputNumber } from 'antd'
import React from 'react'

const TimeoutEditor = ({ value, onChange }) => {
  return (
    <div className="flexCol">
      <div className="flexRowStart flexRowJustBet mb-4">
        <div className="input-head" style={{ width: '140px' }}>
          连接超时时间
        </div>
        <InputNumber
          value={value.connectTimeout}
          onChange={v => onChange({ ...value, connectTimeout: v })}
          placeholder="请输入连接超时时间"
          min={0}
          max={600000}
          style={{ width: '200px' }}
          addonAfter="ms"
        />
      </div>
      <div className="flexRowStart flexRowJustBet ">
        <div className="input-head" style={{ width: '140px' }}>
          读取超时时间
        </div>
        <InputNumber
          value={value.readTimeout}
          onChange={v => onChange({ ...value, readTimeout: v })}
          placeholder="请输入读取超时时间"
          min={0}
          max={600000}
          style={{ width: '200px' }}
          addonAfter="ms"
        />
      </div>
    </div>
  )
}

export default TimeoutEditor